<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>职业发展</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/main.css" />
    <link rel="stylesheet" type="text/css" href="../../css/myDevelop.css" />
</head>
<body>
  <div id="header">
      <div id="back"></div>
      <h3>测试结果</h3>
  </div>
  <div id="all" style="background:#fff">
    <div class="result">
      <div class="user">
        <div class="title">性格测评</div>
        <div><span>测评对象：</span><span class="personName"></span></div>
        <div><span>测评时间：</span><span class="submittime"></span></div>
      </div>
      <div class="typeBox">
        <div class="type"><img src="../../image/type.png"/><span>性格类型：</span><span class="JobName1"></span></div>
        <div class="type"><img src="../../image/type.png"/><span>匹配岗位为：</span><span class="JobName2"></span></div>
        <div class="type"><img src="../../image/type.png"/><span>匹配岗位为：</span><span class="JobName3"></span></div>
        <div class="type"><img src="../../image/type.png"/><span>综合分数：</span><span class="JobName4"></span></div>
      </div>
      <div id="power" style="width:100%;height:300px"></div>
      <div id="bar" style="width:100%;height:240px"></div>
      <div class="baseBox">
        <div class="base">
          <div class="described"><img src="../../image/notice.png"/>基本描述</div>
          <p class="describe">
          </p>
        </div>
        <!-- <div class="base">
          <div class="described"><img src="../../image/toudi1.png"/>可能的盲点</div>
          <p>
            1.你非常固执，一旦决定的事情，会对其他的观点置之不理，<br>
            2.你看问题有很强的批判性，通常持怀疑态度，你需要时常的换位思考，<br>
            3.你非常独立，我行我素，不能理解不合逻辑的事情，忽视他人的情感，并对与你风格不同的人不能理解，非常挑剔；你要学会欣赏他人的优点并及时表达出来。<br>
          </p>
        </div> -->
        <!-- <div class="base">
            <div class="described"><img src="../../image/notice.png"/>导师信息</div>
            <div class="teacher">
              <img class="left" src="../../image/banner1.jpg"/>
              <div class="right">
                <div><span>导师：</span><span>林俊杰</span></div>
                <div><span>职业：</span><span>产品经理</span></div>
              </div>
            </div>
            <p>
              介绍1<br>
              介绍2<br>
              介绍3<br>
            </p>
          </div> -->
          <div class="base">
            <div class="described"><img src="../../image/toudi1.png"/>导师评价</div>
            <p class="commentsOfMentors">
            </p>
          </div>
      </div>
      </div>
    </div>
  </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/jquery.js"></script>
<script type="text/javascript" src="../../script/grade.js"></script>
<script src="../../script/echarts.min.js"></script>
<script type="text/javascript">
apiready=function(){
  var flag=$api.getStorage('flag');
  var aid=$api.getStorage('aid');
  var index=api.pageParam.index;
  var personality=api.pageParam.personality;
  var jobsTendency=api.pageParam.jobsTendency;
  var jobsAbility=api.pageParam.jobsAbility;
  var comprehensive=api.pageParam.comprehensive;
  var personName=api.pageParam.personName;
  var productAverage = [7.5,14.67,8.83,9];
	var frontEndAverage = [4.25,8.75,15.5,11.5];
	var backEndAverage = [8.5,8.5,12.2,10.8];
  var JobName,describe;
  var optionValue=[],optionIndicator=[],optionShadow=[];
  var S,C,D,I;
  if(index==0){
    personalityTime=personality.submittime;
    optionValue=[personality.E,personality.I,personality.S,personality.N,personality.F,personality.T,personality.J,personality.P];
    optionIndicator=[
       { name: 'E', max: 16},
       { name: 'I', max: 16},
       { name: 'S', max: 16},
       { name: 'N', max: 16},
       { name: 'F', max: 16},
       { name: 'T', max: 16},
       { name: 'J', max: 16},
       { name: 'P', max: 16}
    ]
    optionShadow=['E','I','S','N','F','T','J','P'];
    var type='';
    if(personality.E>personality.I){
      type='E';
    }else{
      type='I';
    }
    if(personality.S>personality.N){
      type=type+'S';
    }else{
      type=type+'N';
    }
    if(personality.F>personality.T){
      type=type+'F';
    }else{
      type=type+'T';
    }
    if(personality.J>personality.P){
      type=type+'J';
    }else{
      type=type+'P';
    }
    $(".JobName1").html(type);
    for(var data in grade){
      if(grade[data].name==type){
        describe=grade[data].describe;
      }
    }
  }
  if(index==1){
    jobsTendencyTime=jobsTendency.submittime;
    S=jobsTendency.S;
    C=jobsTendency.C;
    D=jobsTendency.D;
    I=jobsTendency.I;
    optionValue=[S, C, D, I];
    optionIndicator=[
       { name: 'S', max: 16},
       { name: 'C', max: 16},
       { name: 'D', max: 16},
       { name: 'I', max: 16}
    ]
    optionShadow=['S','C','D','I'];
    var minproduct=Math.abs(D-productAverage[0])+Math.abs(I-productAverage[1])+Math.abs(S-productAverage[2])+Math.abs(C-productAverage[3]);
    var minfrontEnd=Math.abs(D-frontEndAverage[0])+Math.abs(I-frontEndAverage[1])+Math.abs(S-frontEndAverage[2])+Math.abs(C-frontEndAverage[3]);
    var backEnd=Math.abs(D-backEndAverage[0])+Math.abs(I-backEndAverage[1])+Math.abs(S-backEndAverage[2])+Math.abs(C-backEndAverage[3]);
    if(minproduct<minfrontEnd&&minfrontEnd<backEnd){
      JobName='产品经理'
    }
    if(minfrontEnd<minproduct&&minfrontEnd<backEnd){
      JobName='前端工程师'
    }
    if(backEnd<minfrontEnd&&backEnd<minproduct){
      JobName='后端工程师'
    }
    $(".JobName2").html(JobName);
    for(var data in grade){
      if(grade[data].name==JobName){
        describe=grade[data].describe;
      }
    }
  }
  if(index==2){
    jobsAbilityTime=jobsAbility.submittime;
    JobName=jobsAbility.name;
    if(JobName=='product'){
      JobName='产品经理'
      optionValue=[jobsAbility.phase1,jobsAbility.phase2,jobsAbility.phase3,jobsAbility.phase4,jobsAbility.phase5,jobsAbility.phase6,jobsAbility.phase7,jobsAbility.phase8];
      optionIndicator=[
        { name: '竞品研究', max: 16},
        { name: '数据运营', max: 16},
        { name: '原型设计', max: 16},
        { name: '项目管理', max: 16},
        { name: '商业模式', max: 16},
        { name: '内容运营', max: 16},
        { name: '需求分析', max: 16},
        { name: '产品规划', max: 16}
      ]
      optionShadow=['竞品研究','数据运营','原型设计','项目管理','商业模式','内容运营','需求分析','产品规划'];
    }else if(JobName=='frontEnd'){
      JobName='前端工程师'
      optionValue=[jobsAbility.phase1,jobsAbility.phase2,jobsAbility.phase3,jobsAbility.phase4,jobsAbility.phase5];
      optionIndicator=[
        { name: '前端基础', max: 16},
        { name: 'HTML', max: 16},
        { name: 'CSS', max: 16},
        { name: 'JavaScript', max: 16},
        { name: 'VUE', max: 16}
      ]
      optionShadow=['前端基础','HTML','CSS','JavaScript','VUE'];
    }else if(JobName=='backEnd'){
      JobName='后端工程师'
      optionValue=[jobsAbility.phase1,jobsAbility.phase2,jobsAbility.phase3,jobsAbility.phase4,jobsAbility.phase5];
      optionIndicator=[
        { name: 'Java基础', max: 16},
        { name: '数据库基础', max: 16},
        { name: '数据结构与算法', max: 16},
        { name: '组成原理操作系统', max: 16},
        { name: '逻辑思维', max: 16}
      ]
      optionShadow=['Java基础','数据库基础','数据结构与算法','组成原理操作系统','逻辑思维'];
    }
    for(var data in grade){
      if(grade[data].name==JobName){
        describe=grade[data].describe;
      }
    }
    $(".JobName3").html(JobName);
  }
  if(index==3){
    comprehensiveTime=comprehensive.applicationTime;
    optionValue=[comprehensive.learningAbility+comprehensive.communicationSkills+comprehensive.bearingCapacity+comprehensive.practicalAbility,comprehensive.professionalKnowledge+comprehensive.relatedKnowledge+comprehensive.technologicalCapability+comprehensive.professionalCapability+comprehensive.planningAbility+comprehensive.controlProjectCapability+comprehensive.riskControlAbility+comprehensive.dataAnalysisAbility,comprehensive.projectManagementCapability+comprehensive.costAnalysisAbility+comprehensive.influencingTeamAbility+comprehensive.impartingAbility];
    optionIndicator=[
      { name: '素质'},
      { name: '知识技能'},
      { name: '客户导向与领导力'}
    ]
    optionShadow=['素质','知识技能','客户导向与领导力'];
    $(".JobName4").html(comprehensive.learningAbility+comprehensive.communicationSkills+comprehensive.bearingCapacity+comprehensive.practicalAbility+comprehensive.professionalKnowledge+comprehensive.relatedKnowledge+comprehensive.technologicalCapability+comprehensive.professionalCapability+comprehensive.planningAbility+comprehensive.controlProjectCapability+comprehensive.riskControlAbility+comprehensive.dataAnalysisAbility+comprehensive.projectManagementCapability+comprehensive.costAnalysisAbility+comprehensive.influencingTeamAbility+comprehensive.impartingAbility);
    $(".commentsOfMentors").html(comprehensive.commentsOfMentors)
  }

  $(".personName").html(personName);
  $(".describe").html(describe)
  $(".typeBox .type").eq(index).show();
  if(index==0){
    $('.user .title').html('性格测评');
    $('.base').eq(0).show();
    $(".submittime").html(personalityTime.replace(/T/g," ").substring(0,personalityTime.length-14));
  }else if(index==1){
    $('.user .title').html('岗位倾向测评');
    $('.base').eq(0).show();
    $(".submittime").html(jobsTendencyTime.replace(/T/g," ").substring(0,jobsTendencyTime.length-14));
  }else if(index==2){
    $('.user .title').html('岗位能力测评');
    $('.base').eq(0).show();
    $(".submittime").html(jobsAbilityTime.replace(/T/g," ").substring(0,jobsAbilityTime.length-14));
  }else if(index==3){
    $('.user .title').html('综合测评');
    $(".submittime").html(comprehensiveTime.replace(/T/g," ").substring(0,comprehensiveTime.length-14));
    $('.base').eq(1).show();
  }

  option = {
    title: {
        text: ''
    },
    tooltip: {},
    legend: {
        x: 'left',
        data: ['能力']
    },
    radar: {
        // shape: 'circle',
        name: {
            textStyle: {
                color: '#fff',
                backgroundColor: '#999',
                borderRadius: 3,
                padding: [3, 5]
           }
        },
        indicator: optionIndicator
    },
    series: [{
        name: '能力',
        type: 'radar',
        itemStyle: {
					normal: {
            color : '#37acfe',//拐点边框颜色
						lineStyle: {
							width:2, //调整 线条的宽度  5已经很宽啦
              color : '#37acfe', //线条颜色
						  }
						}
					},
        // areaStyle: {normal: {}},
        data : [
            {
                value : optionValue,
                name : '能力',
                //这里的配置显示数值
                label: {
                    normal: {
                        show: true,
                        formatter:function(params) {
                            return params.value;
                        }
                    }
            }
          }
        ]
    }]
};
option2 = {
    color: ['#3398DB'],
    tooltip : {
        trigger: 'axis',
        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'category',
            data : optionShadow,
            axisLabel:{interval: 0},
            axisTick: {
                alignWithLabel: true
            }
        }
    ],
    yAxis : [
        {
            type : 'value'
        }
    ],
    series : [
        {
            type:'bar',
            barWidth: '60%',
            data:optionValue
        }
    ]
};
var myChart = echarts.init(document.getElementById('power'));
var myChart2 = echarts.init(document.getElementById('bar'));
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
myChart2.setOption(option2);
}
</script>
<script type="text/javascript">
//jquery
$(function(){
  back();
})
</script>
<script type="text/javascript" src="../../script/main.js"></script>
</html>
